package com.milk.system.converter;

import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.milk.system.model.dto.OrdersDTO;
import com.milk.system.model.entity.Orders;
import com.milk.system.model.vo.OrdersPageVO;
import com.milk.system.model.form.OrdersForm;
import com.milk.system.model.bo.OrdersBO;

/**
 * 订单信息表转换器
 *
 * @author milk
 * @since 2024-05-04
 */
@Mapper(componentModel = "spring")
public interface OrdersConverter{

    OrdersPageVO bo2PageVo(OrdersBO bo);

    Page<OrdersPageVO> bo2PageVo(Page<OrdersBO> bo);

    OrdersForm entity2Form(Orders entity);

    @InheritInverseConfiguration(name = "entity2Form")
    Orders form2Entity(OrdersForm entity);
}